package cn.edu.ncut.cs.springboot.mybatisplusemployee.service.impl;

import cn.edu.ncut.cs.springboot.mybatisplusemployee.entity.Role;
import cn.edu.ncut.cs.springboot.mybatisplusemployee.mapper.RoleMapper;
import cn.edu.ncut.cs.springboot.mybatisplusemployee.service.IRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import org.springframework.lang.NonNull;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ncut
 * @since 2024-12-24
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> getRoles(@NonNull Long userId) {
        return roleMapper.getRolesById(userId);
    }
}
